<?php
$this->breadcrumbs=array(
	'Sự kiện về chủ đề: ' . $model->title,	
);
$this->pageTitle = $model->seotool->title;
$this->pageDescription = $model->seotool->description;
$this->pageKeywords = $model->seotool->keywords;
$this->pageCanonical = array('/Home/labels/view', array('slug'=>$model->slug));

$this->pageFacebook=array(
    'og:title'=>$model->seotool->title,
    'og:author'=>SITE_AUTHOR,
    'og:type'=>'article',
    'og:image'=>'nexttopevent.jpg',
    'og:url'=>array('/Home/labels/view', array('slug'=>$model->slug)),
    'og:description'=>$model->seotool->description,
    'og:locale'=>'vi_VN',
);
?>
<div class="row">
    <div class="col-xs-2 col-left">
        <!-- Docs Categories -->
        <?php $this->widget('Category'); ?>
        <!-- Docs Advance Search -->
        <?php $this->widget('Search'); ?>
        <!-- Docs Support -->
        <?php $this->widget('Support'); ?>
    </div>
    <div class="col-xs-7 col-middle">
		<?php $this->widget('zii.widgets.CListView', array(
			'id'=>'event-list',
			'dataProvider'=>$dataProvider,
			'itemView'=>'application.modules.Events.views.default._view',
			'summaryText'=>'',//'Hiển thị sự kiện trang {page}/{pages}',
			'summaryCssClass'=>'text-right',
			'afterAjaxUpdate'=>'js: function(){
				$("html, body").animate({
					scrollTop: $("#event-list").offset().top
				}, 2000);
			}',
			'pagerCssClass'=>'text-center',
			'pager'=>array(
				'header'=>'',
				'maxButtonCount'=>10,
				'header'=>'',
				'prevPageLabel'=>'&laquo;',
				'nextPageLabel'=>'&raquo;',
				'firstPageLabel'=>'Trang đầu',
				'lastPageLabel'=>'Trang cuối',
				'footer'=>'',
				'selectedPageCssClass'=>'active',
				'hiddenPageCssClass'=>'disabled',
				'htmlOptions'=>array(
					'class'=>'pagination pagination-sm',
				),
			),
			'htmlOptions'=>array(
				'class'=>''
			),
		)); ?>
    </div>
    <div class="col-xs-3 col-right">
        <aside class="widget box bg-grey">
        	<h3>Sự kiện được quan tâm</h3>
            <div class="event-small">
                <?php foreach ($news as $data): ?>
            	<div class="event-item">
                    <div class="event-image">
                        <a href="<?php echo Yii::app()->createurl('/Home/news/view', array('slug'=>$data->slug)); ?>" title="<?php echo $data->title; ?>">
                            <img src="<?php echo IMAGES_URL . 'news/' , date('Ymd', strtotime($data->posteddate)), '/', $data->image; ?>" alt="<?php echo $data->title; ?>" />
                        </a>
                    </div>
                    <div class="event-content">
                        <?php echo CHtml::link($data->title, array('/Home/news/view', 'slug'=>$data->slug), array('title'=>$data->title)); ?>
                    </div>
                </div>
            <?php endforeach; ?>
            </div>
        </aside>
    </div>
</div>
